<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ include file="/parameter.jsp" %>
<%@page isELIgnored="false"%>
<c:set var="i" value="1" />
<c:choose><c:when test="${fn:length(TopicList) > 0}">
<c:forEach items="${TopicList}" var="topicList" varStatus="vs">

	<c:choose>
		<c:when test="${'0' != topicList.level}">
			<div class="post">
		</c:when>
		<c:otherwise>
				<c:choose>
					<c:when test="${vs.count % 2 == 0}">
						<div class="post">
					</c:when>
					<c:otherwise>
						<div class="post odd">
					</c:otherwise>
				</c:choose>
		</c:otherwise>
	</c:choose>


        <div>&#8226;&nbsp;<span class="key"><c:if test="${topicList.postkey != null && topicList.postkey != ''}">[${topicList.postkey}]</c:if></span><A  class="title" href="commonAction.do?method=TopicResponsInfo&topid=${topicList.id}">${topicList.title}</A><span class="icon"><c:if test="${fn:length(topicList.attlist) > 0}"><img src="images/common.gif" /></c:if> <c:if test="${topicList.essence == '1'}"><img src="images/jing.gif" /></c:if> <c:if test="${topicList.sorttype == '1'}"><img src="images/zding.gif" /></c:if></span>
        <span><a href="commonAction.do?method=ViewUserInfo&uid=${topicList.postuser.id}">${topicList.postuser.nickname}</a></span><span>( <fmt:formatDate value="${topicList.date}" type="both"/> )</span>
        </div>     
        <c:if test="${topicList.historical != '1'}"> 
            <c:if test="${null != sessionScope.user}">
                <c:if test="${(topicList.board.boarduser.id == sessionScope.user.id) || (sessionScope.user.usergrade == '0')}">
                    <a href="commonAction.do?method=TopicOrResponsEdit&tid=${topicList.id}">修改编辑</a>&nbsp;&nbsp;<a href="###" onclick="DelPost('${topicList.id}');">删除</a>
                </c:if>
            </c:if>
            <c:if test="${null != sessionScope.user}">
            <c:if test="${(topicList.board.boarduser.id == sessionScope.user.id) || (sessionScope.user.usergrade == '0')}">
            <select id="essence${i}" name="essence${i}" onchange="SetEssence('${topicList.id}',this);">
                <option value="1" <c:if test="${topicList.essence == '1'}">selected</c:if>>精华</option>
                <option value="0" <c:if test="${topicList.essence == '0'}">selected</c:if>>普通</option>
            </select>
            </c:if>
            <c:set var="i" value="${i + 1}"/>
            </c:if>
		</c:if>
    <c:if test="${fn:length(topicList.respost) > 0}"> 
    <c:set var="TopicList" value="${topicList.respost}" scope="request" />
    <div class="reply">
        <c:import url="__c.jsp" />
    </div>
	</c:if>
    
</div>
</c:forEach>
</c:when><c:otherwise>
<div class="msg">
    <span class="message cl">没有查询到帖子。<span>
</div>
</c:otherwise></c:choose>